<!DOCTYPE html>
<html lang="zh-CN">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>搜索</title>
		<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, width=device-width">
		<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/common.css">
		<script type="text/javascript" src="http://libs.baidu.com/jquery/1.9.1/jquery.js"></script>
		<style type="text/css">
		button{
			margin-top: 7px;
			border: 1px solid #E1E1E1;
			border-radius:5px;
			margin-left: .15rem;
			width: 8%;
			height: 1.5rem;
		}
		</style>
	</head>

	<body>
		<div id="container">
			<section class="searchBar wap">
				<div class="searchBox">
				<form  method="post" action="__APP__/Scan/isbmreturn">
						<input type="text" id="keyword" name="keyword" placeholder="" autocomplete="off">
				<button class="button1">搜索</button>
				</form>
				
				<button class="button2">扫描</button>
				</div>
				</form>
				
			</section>
			<section class="hotBox">
				<div class="title">热门搜索</div>
				<ul class="hotKeyUl">
					<li>
						<a href="#">酒店</a>
					</li>
					<li>
						<a href="#">火锅</a>
					</li>
					<li>
						<a href="#">料理</a>
					</li>
					<li>
						<a href="#">酒店</a>
					</li>
					<li>
						<a href="#">电影</a>
					</li>
					<li>
						<a href="#">家政</a>
					</li>
					<li>
						<a href="#">洗车</a>
					</li>
					<li>
						<a href="#">美妆</a>
					</li>
				</ul>
			</section>
			<section class="historyBox" style="">
				<div class="title">搜索历史</div>
				<ul>
					<li class="link-url">食物</li>
					<li class="clear">清除搜索记录</li>
				</ul>
			</section>
		</div>
	<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script  type="text/javascript">  
wx.config({
debug: false,
appId: '<?php echo $signpackage["appId"];?>',
timestamp: '<?php echo $signpackage["timestamp"];?>',
nonceStr: '<?php echo $signpackage["nonceStr"];?>',
signature: '<?php echo $signpackage["signature"];?>',
jsApiList: [
'scanQRCode',
]
});
    wx.error(function(res) {  
        alert("出错了：" + res.errMsg);
    });  
    wx.ready(function() {  
        wx.checkJsApi({  
            jsApiList : ['scanQRCode'],  
            success : function(res) {  
            }  
        });  
        //扫描二维码
        document.querySelector('.button2').onclick = function() {  
            wx.scanQRCode({  
                needResult : 1,// 默认为0，扫描结果由微信处理，1则直接返回扫描结果，  
                scanType : [ "qrCode", "barCode" ], // 可以指定扫二维码还是一维码，默认二者都有  
                success : function(res) {  
                    var result = res.resultStr; // 当needResult 为 1 时，扫码返回的结果
                    alert(result); 
                    //$.post('__APP__/Scan/isbmreturn',{'isbm',result});
                    window.location.href= "__APP__/Scan/isbmreturn_2/isbm/" + result;
                }  
            });  
        };//end_document_scanQRCode  
          
    });//end_ready  
</script> 
<script type="text/javascript">
	$('.button1').click(function(){
		  $("form").submit();
	});
</script>
	</body>
</html>